import { History } from "history";

import { FormComponentProps } from "antd/lib/form/Form";

export interface UmiComponentProps {
  history?: History;
  dispatch?: ({ type }: { type: string, payload?: any }) => Promise<any>;
}

export interface BaseComponentProps {
  buttons?: Array<{ name: string }>;
  dict?: { [x: string]: any };
  loading?: boolean;
  cond?: Filds;
}

export interface SearchComponentProps extends FormComponentProps {
  current: number;
  initCurrent: () => void;
  new?: boolean;
}

export interface FormComponentProps extends FormComponentProps {
  keys?: Array<string>
}

export interface Filds {
  [x: string]: any,
}